package HTTPServer.Bank;

import java.util.*;


public class ConcreteBank implements Bank {
    private ArrayList<Account> accounts = new ArrayList<Account>();
    
    public ConcreteBank() {
    }
    
    public Account getAccount(String name) {
        for(Account a : accounts) {
            if(a.getName().equals(name)) {
                return a;
            }
        }
        
        Account account = new ConcreteAccount(name);
        accounts.add(account);
        return account;
    }
}
